package com.deep.deepenterpise.common.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xyz
 * @version 1.0
 * @title DrPayStateEnum
 * @description
 * @create 2024/5/20 16:18
 */
@Getter
public enum DrDangerSlaveEnum {
    UNQUALIFIED(0, "不合格"),
    DONE(1, "已完成"),
    WAIT_RECHECK(2, "待复检"),
    PENDING(3, "整改中"),
    WAIT(4, "待审核"),
    WAIT_CHECK(5, "待检查"),
    NO(6, "无隐患"),
    ;
    public static final Map<Integer, String> DR_DANGER_SLAVE_MAP = new HashMap<>(6);

    static {
        for (DrDangerSlaveEnum state : DrDangerSlaveEnum.values()) {
            DR_DANGER_SLAVE_MAP.put(state.getDrState(), state.getValue());
        }
    }

    private final Integer drState;
    private final String value;

    DrDangerSlaveEnum(Integer drState, String value) {
        this.drState = drState;
        this.value = value;
    }


    public boolean compare(Integer drState) {
        return this.drState.equals(drState);
    }

    public boolean compare(DrDangerSlaveEnum drStateEnum) {
        return this.compare(drStateEnum.getDrState());
    }
}
